

//*****************************************************************************
//******   FOR NETBEANS   *****************************************************
//*****************************************************************************

task runAdmin(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Admin'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Admin'
        args '-ide'
        args '--debug'
        args '-uep'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugAdmin(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.FAdmin'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.FAdmin'
        args '-ide'
        args '--debug'
        args '-uep'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runServer(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Server'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Server'
        args '-ide'
        args '--debug'
        args '-http'
        args '8081'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugServer(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.Server'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Server'
        args '-ide'
        args '--debug'
        args '-http'
        args '8081'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runClient(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Client'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Client'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        args '-cfg'
        args 'config/clientboard.xml'
        args '+cfgfx'
        args 'config/clientboardfx.properties'
        args '++point'
        args '234'
        args '-d'
        args '++terminal'
        args '-np'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugClient(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.Client'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Client'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        args '-cfg'
        args 'config/clientboard.xml'
        args '+cfgfx'
        args 'config/clientboardfx.properties'
        args '++point'
        args '234'
        args '-d'
        args '++terminal'
        args '-np'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runDesktop(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Desktop'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Desktop'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        args '-cfg'
        args 'config/clientboardZ.xml'
        args '++point'
        args '234'
        args '-d'
        args '++terminal'
        args '-np'
    }
    doLast {}
}

task debugDesktop(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.Desktop'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Desktop'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        args '-cfg'
        args 'config/clientboardZ.xml'
        args '++point'
        args '234'
        args '-d'
        args '++terminal'
        args '-np'
    }
    doLast {}
}

task runWelcome(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Welcome'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Welcome'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-sport'
        args '3128'
        args '-cport'
        args '3129'
        args '--debug'
        args '-wm'
        args 'touch'
        //args '+-wm,--welcome-mode <touch,info,med,btn,kbd>'
        args '+demo'
        args '+clangs'
        args '+keyboard'
        args '-ndiv'
        args '->'
        args '-httpg'
        args '8081'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugWelcome(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.Welcome'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Welcome'
        args '-ide'
        args '-s'
        args '127.0.0.1'
        args '-sport'
        args '3128'
        args '-cport'
        args '3129'
        args '--debug'
        args '-wm'
        args 'touch'
        args '+info'
        args '+buttons'
        args '+demo'
        args '+clangs'
        args '+keyboard'
        args '-ndiv'
        args '->'
        args '-httpg'
        args '8081'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runReception(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.Reception'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Reception'
        args '-ide'
        args '--debug'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugReception(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.Reception'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.Reception'
        args '-ide'
        args '--debug'
        args '-s'
        args '127.0.0.1'
        args '-cport'
        args '3129'
        args '-sport'
        args '3128'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runConfigServer(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.ServerConfig'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.ServerConfig'
        args '-ide'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugConfigServer(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.ServerConfig'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.ServerConfig'
        args '-ide'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runTabloRedactor(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.TabloRedactor'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.TabloRedactor'
        args '-tcfg'
        //args 'config/fractal-part-board.xml'
        args 'config/mainboard.xml'
        args '-ide'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugTabloRedactor(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.TabloRedactor'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.TabloRedactor'
        args '-tcfg'
        args 'config/fractal-part-board.xml'
        args '-ide'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task runUB(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        main = 'ru.apertum.qsystem.HardwareButtons'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.HardwareButtons'
        args '-ide'
        args '+start'
        args '--debug'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}

task debugUB(dependsOn: 'classes', type: JavaExec) {
    doFirst {
        debug = true
        main = 'ru.apertum.qsystem.HardwareButtons'
        classpath = sourceSets.main.runtimeClasspath
        args 'ru.apertum.qsystem.HardwareButtons'
        args '-ide'
        args '+start'
        args '--debug'
        systemProperty 'simple.message', 'Hello '
    }
    doLast {}
}
